//
//  DYTingcheViewController.swift
//  SheYangBigData
//
//  Created by 宋海胜 on 2021/1/6.
//  Copyright © 2021 叁拾叁. All rights reserved.
//

import UIKit
import AMapFoundationKit
import MAMapKit
import AMapSearchKit

class DYTingcheViewController: SYBaseViewController, MAMapViewDelegate, AMapSearchDelegate {

    var mapView: MAMapView!
    let biaoqian: DYBiaoqianChoiceView = DYBiaoqianChoiceView(frame: CGRect(x: 0, y: NAV_HEIGHT, width: SCREEN_WIDTH, height: 40))
    let bottom: DYTingcheBottomView = DYTingcheBottomView(frame: CGRect(x: 0, y: NAV_HEIGHT + 222.0.autoWidth() + 40, width: SCREEN_WIDTH, height: 280.0.autoWidth()))
    override func viewDidLoad() {
        super.viewDidLoad()

        self.title = "智能停车"
        creatBiaoqian()
        creatMap()
        
        self.view.backgroundColor = Constant.bgViewColor
    }
    

    func creatBiaoqian() {
        
        biaoqian.configureView(titles: ["P1", "P2", "P3", "P4", "P5", "P6", "P7"])
        biaoqian.backgroundColor = .white
        biaoqian.clickedClosure = { index in
//            self.mapSearch()
            
        }
        view.addSubview(biaoqian)
        view.addSubview(bottom)
    }
    
    func creatMap() {
        mapView = GaodeManager.creatMapContent()
        view.addSubview(mapView)
        mapView.snp.makeConstraints { (make) in
            make.left.right.equalToSuperview()
            make.height.equalTo(222.0.autoWidth())
            make.top.equalTo(biaoqian.snp.bottom)
        }
    }

    
}
